# -*- coding: utf-8 -*-
import cgi
import datetime
import wsgiref.handlers

from google.appengine.ext import db
import enhancedModel as em
#import MPTemplates as MPT
import shippingOrder as som
from datetime import timedelta

class MPTemplateModel( em.EnhancedModel ):
    __prefix__ = 'MilestonePlanTemplate'
    
    data = db.TextProperty()

    @staticmethod
    def file():
        result = em.EnhancedModel.queryLatest( MPTemplateModel, 1 ).filter('archival =', False).get()
        if result == None:
          return ""
        return result.data